#ifndef USART_H
#define USART_H

#include "variables.h"
#include "gd32f10x_dma.h"

#define DMA_RX_LEN_44 500
#define DMA_RX_LEN_201 500

void usart_dma_reconfig(u32 dma_base,dma_channel_enum dma_ch,u16 rxlen);
void usart0_init(u8 baudrate_num);
void usart1_init(u8 baudrate_num);
void usart2_init(u8 baudrate_num);
void usart2_reinit(u8 baudrate_num);
void usart_send(u8 usart_index,u8 *data,u16 txlen);
void usart_enable_local(u8 usart_index);
u8 *usart1_addr_get(void);
u8 *usart2_addr_get(void);
#endif
